package edu.hunau.pojo;


import java.util.Arrays;
import java.util.List;

/**
 * 特产
 * @author hb
 * @date 2022-11-14 17:29:17
 */
public class Specialty {
    private String name; //特产名称
    private boolean vegetarian; //是否为素食
    private int calories; //卡路里
    private String placeOrigin; //产地
    private Type type;

    //为测试准备的数据
    public static final List<Specialty>  lists= Arrays.asList(
            new Specialty("龙山萝卜",true,310,Type.OTHER,"湘西州"),
            new Specialty("湘西黄牛",false,900,Type.MEAT,"湘西州"),
            new Specialty("岳阳黄茶",true,320,Type.OTHER,"岳阳"),
            new Specialty("五强溪鱼",false,700,Type.FISH,"岳阳"),
            new Specialty("沩山毛尖",true,380,Type.OTHER,"长沙"),
            new Specialty("津市米粉",true,410,Type.MEAT,"常德"),
            new Specialty("珊珀湖黑鲫",false,500,Type.OTHER,"常德"),
            new Specialty("大围山梨",true,300,Type.OTHER,"长沙"),
            new Specialty("东江鱼",false,430,Type.FISH,"郴州")

    );

    public Specialty() {
    }

    public Specialty(String name, boolean vegetarian, int calories, Type type, String placeOrigin) {
        this.name = name;
        this.vegetarian = vegetarian;
        this.calories = calories;
        this.placeOrigin = placeOrigin;
        this.type = type;
    }

    public Specialty(String name, boolean vegetarian, int calories, Type type) {
        this.name = name;
        this.vegetarian = vegetarian;
        this.calories = calories;
        this.type = type;
    }

    @Override
    public String toString() {
        return String.format("Specialty{name=%s,vegetarian=%s,calories=%d,type=%s}",name,vegetarian,calories,type);
    }

    public enum Type{
       MEAT,FISH,OTHER;
    }

    public enum CaloriesLevel{
        DIET,NORMAL,FAT;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public boolean isVegetarian() {
        return vegetarian;
    }

    public void setVegetarian(boolean vegetarian) {
        this.vegetarian = vegetarian;
    }

    public int getCalories() {
        return calories;
    }

    public void setCalories(int calories) {
        this.calories = calories;
    }

    public Type getType() {
        return type;
    }

    public void setType(Type type) {
        this.type = type;
    }

    public String getPlaceOrigin() {
        return placeOrigin;
    }

    public void setPlaceOrigin(String placeOrigin) {
        this.placeOrigin = placeOrigin;
    }
}
